Skip to content

SG-38306 Python2 Removal - Part 9 - six module #395

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: ticket/SG-38306-python2-ensure-ascii
Choose a base branch
from

Conversation

@eduardoChaucaGallegos eduardoChaucaGallegos requested a review from a team July 10, 2025 16:01
@eduardoChaucaGallegos eduardoChaucaGallegos changed the title SG 38306 Python2 removal six and ensure_ functions SG 38306 Python2 removal six and ensure_ functions, httplib2 Jul 10, 2025
Copy link
Contributor

@carlos-villavicencio-adsk carlos-villavicencio-adsk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a small proposal.

@eduardoChaucaGallegos eduardoChaucaGallegos force-pushed the SG-38306-python2-removal-six branch 2 times, most recently from 72a8750 to 733f058 Compare July 15, 2025 17:22
@julien-lang julien-lang changed the title SG 38306 Python2 removal six and ensure_ functions, httplib2 SG-38306 Python2 Removal - Part 1 - six and ensure_ functions, httplib2 Jul 16, 2025
@julien-lang julien-lang force-pushed the SG-38306-python2-removal-six branch 2 times, most recently from 24ce878 to 4961679 Compare July 16, 2025 13:52
@julien-lang julien-lang changed the base branch from master to ticket/SG-38306-python2-ensure-ascii July 16, 2025 13:52
@julien-lang julien-lang changed the title SG-38306 Python2 Removal - Part 1 - six and ensure_ functions, httplib2 SG-38306 Python2 Removal - Part 10 - six module Jul 16, 2025
@julien-lang julien-lang changed the title SG-38306 Python2 Removal - Part 10 - six module SG-38306 Python2 Removal - Part 9 - six module Jul 16, 2025
@julien-lang julien-lang force-pushed the ticket/SG-38306-python2-ensure-ascii branch from 2f109c4 to f6275cd Compare July 17, 2025 17:37
@julien-lang julien-lang force-pushed the SG-38306-python2-removal-six branch from 4961679 to 9a131fa Compare July 17, 2025 19:25
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's only possible if shotgunsoftware/tk-core#1042 is merged and released first

@julien-lang julien-lang requested a review from Copilot July 17, 2025 19:30
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR removes Python 2 compatibility code as part of the larger Python 2 removal effort, specifically targeting the six module and related utility functions. The changes clean up legacy compatibility layers that are no longer needed since the project has moved to Python 3 only.

Key changes:

  • Removed the bundled six module and related imports from test and production code
  • Deleted the custom sgutils.py and sgsix.py compatibility modules
  • Replaced six.PY38 version checks with direct sys.version_info comparisons
  • Updated configuration files to exclude removed modules from linting and coverage

Reviewed Changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
shotgun_api3/shotgun.py Replaced six.PY38 checks with sys.version_info comparisons and removed six/sgutils imports
shotgun_api3/lib/six.py Complete removal of the bundled six compatibility library
shotgun_api3/lib/sgutils.py Removed custom utility functions for Python 2/3 compatibility
shotgun_api3/lib/sgsix.py Removed Shotgun-specific six extensions module
tests/*.py Cleaned up six imports from test files
Configuration files Updated flake8 and coverage exclusions to remove references to deleted modules

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants